
package taller2.controller.modes;

import java.awt.event.MouseEvent;

import taller2.utils.Point;
import taller2.view.draws.DrawingArea;
import taller2.view.draws.GraphDrawer;

public class SelectNodeMode implements Mode {
	
	// when pressed selects the closeby node
	public void whenPressed(MouseEvent arg0, DrawingArea area) {
		GraphDrawer drawer = area.getDrawer();
		Point pos = new Point(arg0.getX(),arg0.getY());
		
		drawer.selectCloseByNode(pos);
		area.repaint();
	}

	public void whenReleased(MouseEvent arg0, DrawingArea area) {}

	public void whenDragged(MouseEvent arg0, DrawingArea area) {}

}
